package model.agent.mapper;


import model.agent.entity.Newagent;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by Administrator on 2019/6/23.
 */
@Mapper
public interface INewagentMapper {
    @Select("select * from newagent where id=#{id}")
    Newagent getById(String id);
    @Insert("insert into newagent values(#{id},#{newId},#{name},#{age},#{tel},#{hiredate},#{picture},#{identitycard})")
    void save(Newagent newagent);
    @Select("select * from newagent where name like concat('%',#{name},'%')")
    List<Newagent> findall(String name);
    @Delete("delete from newagent where name=#{name}")
    void  del(String name);
    @Update("update newagent set name=#{name} where id = #{id}")
    void  update(@Param("id") String id, @Param("name") String name);
}
